/**
 * 
 */
package integercoding;

/**
 * @author ricardo
 * 
 */
public class EliasDelta {

	public static String encode(int number) {
		double x = Math.log(number) / Math.log(2);
		int val = (int) (Math.floor(x) + 1);
		String base = EliasGamma.encode(val);
		String pre = Integer.toBinaryString(number);
		return base + pre.substring(1);
	}
}
